<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>博客文章</title>

    <th:block th:replace="headfoot/head::head_common"></th:block>
    <link th:href="@{/lib/editor.md-master/css/editormd.min.css}"></link>
    <!-- <link th:href="@{/lib/wangEditor-3.1.1/release/wangEditor.min.css}"></link>
     <link th:href="@{/lib/wangEditor-3.1.1/release/wangEditor-fullscreen-plugin.css}"></link>-->
    <!-- <th:block th:replace="headfoot/head::head_common"></th:block>-->

    <script th:src="@{/lib/jquery/jquery-1.12.4.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/marked.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/prettify.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/raphael.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/underscore.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/sequence-diagram.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/flowchart.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/lib/jquery.flowchart.min.js}"></script>
    <script th:src="@{/lib/editor.md-master/editormd.min.js}"></script>
    <script th:src="@{/js/nojs.js}"></script>
</head>

<body>
<div class="container-fluid kj-form-container">
    <form id="form" class="form-horizontal validate kj-form-container-content" role="form"
          method="post" action="/blog/article/save">
        <input type="hidden" id="id" name="id" th:value="${entity?.id}"/>

        <div class="from-group row has-feedback kj-form-title-button-bar">
            <div class="col-md-7">
                <button type="button" class="btn btn-default btn-sm action-ajax-form kj-btn-save">
                    <i class="iconfont icon-baocun"></i>&ensp;保存
                </button>
                <button type="button" class="btn btn-default btn-sm action-close-tab kj-btn-cancel">
                    <i class="iconfont icon-guanbi"></i>&ensp;取消
                </button>
            </div>
            <div class="col-md-5">
                </label> <label class="control-label kj-form-title-button-bar-label">创建时间：
                <span th:text="${entity?.createTime != null ? #dates.format(entity?.createTime, 'yyyy-MM-dd HH:mm:ss') : #dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}"></span>
            </label>
            </div>

        </div>

        <div class="card kj-form-container-card">
            <div class="card-header kj-form-container-card-header">
                <h4>
                    <strong>文章信息</strong>
                </h4>
            </div>
            <div class="card-body kj-form-container-card-body">

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">标题</label>
                    <div class="col-md-8 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="title"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="120"
                               data-rule-repeat="/blog/article/check?column=title"
                               data-msg-repeat="标题重复"
                               autocomplete="off"
                               placeholder="标题"
                               th:value="${entity?.title}"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">简介</label>
                    <div class="col-md-8 validateDiv">
                        <textarea rows="3" class="form-control" id="summary" name="summary"
                                  th:text="${entity?.summary}" data-rule-required="true"
                                  placeholder="请输入简介" autocomplete="off"></textarea>
                    </div>
                </div>

                <div class="form-group">

                    <label class="col-md-2 control-label kj-form-container-content-label">图标</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name=""
                               type="text"
                               placeholder="图标"
                               th:value="${entity?.icon}"/>
                    </div>

                    <label class="col-md-2 control-label kj-form-container-content-label">作者</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="author"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="20"
                               placeholder="作者"
                               th:value="${entity?.author}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">是否原创</label>
                    <div class="col-md-3 validateDiv">
                        <label class="radio-inline">
                            <input type="radio" value="1" name="originated" data-rule-required="true">原创 </label>
                        <label class="radio-inline">
                            <input type="radio" value="0" name="originated" data-rule-required="true">非原创</label>
                    </div>
                    <label class="col-md-2 control-label kj-form-container-content-label">来源</label>
                    <div class="col-md-3 validateDiv">
                        <input class="form-control input-sm kj-form-container-content-input"
                               name="source"
                               type="text"
                               data-rule-required="true" data-rule-maxlength="50"
                               placeholder="非原创时请输入来源"
                               th:value="${entity?.source}"/>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">专题</label>
                    <div class="col-md-3 validateDiv">
                        <select id="topicId"
                                class="form-control input-sm kj-form-container-content-select select2"
                                name="topicId"
                                data-url="/blog/topic/all"
                                th:data-value="${entity?.topicId}">
                            <option value="">--请选择--</option>

                        </select>
                    </div>

                    <label class="col-md-2 control-label kj-form-container-content-label">分类</label>
                    <div class="col-md-3 validateDiv">
                        <select id="categoryId"
                                class="form-control input-sm kj-form-container-content-select select2"
                                name="categoryId"
                                data-url="/blog/category/all"
                                th:data-value="${entity?.categoryId}">
                            <option value="">--请选择--</option>

                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label kj-form-container-content-label">是否公开</label>
                    <div class="col-md-3 validateDiv">
                        <select id="authority"
                                class="form-control input-sm kj-form-container-content-select"
                                name="authority"
                                th:data-value="${entity?.authority}">
                            <option value="0">公开</option>
                            <option value="1">好友</option>
                            <option value="2">自己</option>

                        </select>
                    </div>

                    <label class="col-md-2 control-label kj-form-container-content-label">是否发布</label>
                    <div class="col-md-3 validateDiv">
                        <select id="enabled"
                                class="form-control input-sm kj-form-container-content-select "
                                name="enabled"
                                th:data-value="${entity?.enable}">
                            <option value="true">是</option>
                            <option value="false">否</option>

                        </select>
                    </div>
                </div>


            </div>
        </div>


        <div class="form-group">
            <label for="" class="col-md-1 col-sm-1 control-label">内容*</label>
            <div class="clearfix" style="margin: 10px;"></div>
            <div class="editormd" data-height="650" data-width="95%">
                <textarea name="content" class="form-control" style="display:none;"
                          th:utext="${entity?.content}"></textarea>
            </div>
        </div>
    </form>
</div>


</body>
</html>